import request from '../utils/request';
import {config} from "md-editor-v3/lib/MdEditor/config";

export const fetchData = () => {
    return request({
        url: './table.json',
        method: 'get'
    });
};

// export const gatewayServerData = () => {
//     return request({
//         url: './gateway_server.json',
//         method: 'get'
//     });
// };

// function 方式定义函数
// @ts-ignore
export function gatewayServerData(query) {
    return request({
        // url: './gateway_server.json',
        url: '/composite/pageGatewayServer?groupName=' + query.groupName + '&pageNum=' + query.pageNum + '&pageSize=' + query.pageSize,
        method: 'get'
    });
}

// const 方式定义函数
// @ts-ignore
export const gatewayServerDetailData = (data) => {
    return request({
        // url: './gateway_server_detail.json',
        url: '/composite/pageGatewayServerDetail',
        method: 'post',
        data: data
    });
};
// @ts-ignore
export const gatewayDistributionData = (data) => {
    return request({
        // url: './gateway_distribution.json',
        url: '/composite/pageGatewayDistribution',
        method: 'post',
        data: data
    });
};
// @ts-ignore
export const applicationSystemData = (data) => {
    return request({
        // url: './application_system.json',
        url: '/composite/pageApplicationSystem',
        method: 'post',
        data: data
    });
};
// @ts-ignore
export const applicationInterfaceData = (data) => {
    return request({
        // url: './application_interface.json',
        url: '/composite/pageApplicationInterface',
        method: 'post',
        data: data
    });
};
// @ts-ignore
export const applicationInterfaceMethodData = (data) => {
    return request({
        // url: './application_interface_method.json',
        url: '/composite/pageApplicationMethod',
        method: 'post',
        data: data
    });
};
